﻿using UnityEngine;
using System.Collections;
using DG.Tweening;
using System;

namespace YoUI.Core.UIAnima
{
    /// <summary>
    /// UI缩放动画
    /// </summary>
    [AddComponentMenu("YoUI/Anima/DoTweenScale")]
    public class YoTweenScale : YoTweenBase
    {
        public Vector3 from;
        public Vector3 to;

        public override Tweener Anima()
        {
            return rt.DOScale(to, duration);
        }

        protected override void Awake()
        {
            base.Awake();

            from = Vector3.zero;
            to = Vector3.one;
            rt.localScale = Vector3.zero;
        }

    }
}